package cn.yy.cloudpay.util;

import java.util.HashMap;
import java.util.Map;

public class Constant {

	/**
	 * 支付方式
	 */
	public final static Integer PAY_TYPE_ALIPAY = 1; // 支付宝扫码支付
	public final static Integer PAY_TYPE_MICROPAY = 2; // 微信扫码支付
	public final static Integer PAY_TYPE_BANKCARD = 3; // 银盛刷卡支付
	public final static Integer PAY_TYPE_CASH = 4; // 现金支付
	public final static Integer PAY_TYPE_ALIPAY_NS = 5; // 农商支付宝
	public final static Integer PAY_TYPE_MICROPAY_NS = 6; // 农商微信
	public final static Integer PAY_TYPE_BANKCARD_NS = 7; // 农商刷卡支付
	public final static Integer PAY_TYPE_ALIPAY_YS = 8; // 银盛支付宝
	public final static Integer PAY_TYPE_MICROPAY_YS = 9; // 银盛微信
	public final static Integer PAY_TYPE_PREAUTH_YS = 10; // 银盛预授权支付
	public final static Integer PAY_TYPE_CANCELPREAUTH_YS = 12; // 银盛预授权撤销
	public final static Integer PAY_TYPE_DONEPREAUTH_YS = 13; // 银盛预授权完成
	public final static Integer PAY_TYPE_PREAUTH_NS = 11; // 农商预授权支付
	public final static Integer PAY_TYPE_CANCELPREAUTH_NS = 14; // 农商预授权撤销
	public final static Integer PAY_TYPE_DONECANCELPREAUTH_NS = 15; // 农商预授权完成撤销
	public final static Integer PAY_TYPE_DONEPREAUTH_NS = 16; // 农商预授权完成
	public final static Integer PAY_TYPE_YIPAY = 17; // 翼支付
	public final static Integer PAY_TYPE_BANKCARD_Q = 18; // 银盛刷卡支付
	public final static Integer PAY_TYPE_ALIPAY_LH= 19; // 联惠支付宝
	public final static Integer PAY_TYPE_MICROPAY_LH = 20; // 联惠微信
	public final static Integer PAY_TYPE_HB_LH = 21; // 联惠和包
	public final static Integer PAY_TYPE_FEIXIPAY = 22; // 飞洗支付
	public final static Integer PAY_TYPE_BANKUNION_YS = 23; // 银联支付
	public final static Integer PAY_TYPE_ALIPAY_WF = 25; // 威富通支付宝
	public final static Integer PAY_TYPE_MICROPAY_WF = 26; // 威富通微信

	public final static Map<Integer,String> PAY_TYPE_MAP = new HashMap<Integer,String>(){{
		put(PAY_TYPE_ALIPAY, "支付宝");
		put(PAY_TYPE_MICROPAY, "微信");
		put(PAY_TYPE_BANKCARD, "银联");
		put(PAY_TYPE_CASH, "现金");
		put(PAY_TYPE_ALIPAY_NS, "支付宝(农商)");
		put(PAY_TYPE_MICROPAY_NS, "微信(农商)");
		put(PAY_TYPE_ALIPAY_YS, "支付宝(银盛)");
		put(PAY_TYPE_MICROPAY_YS, "微信(银盛)");
		put(PAY_TYPE_ALIPAY_LH, "支付宝(联惠)");
		put(PAY_TYPE_MICROPAY_LH, "微信(联惠)");
		put(PAY_TYPE_HB_LH, "和包(联惠)");
		put(PAY_TYPE_FEIXIPAY, "飞洗支付");
		put(PAY_TYPE_BANKUNION_YS, "银联支付(银盛)");
		put(PAY_TYPE_ALIPAY_WF, "支付宝(威富通)");
		put(PAY_TYPE_MICROPAY_WF, "微信(威富通)");
	}};


	/**
	 * 支付通道
	 */
	public final static String PAY_WAY_ALIPAY = "01"; // 支付宝扫码支付
	public final static String PAY_WAY_MICROPAY = "02"; // 微信扫码支付
	public final static String PAY_WAY_BANKCARD = "03"; // 银联刷卡支付
	public final static String PAY_WAY_CASH = "04"; // 现金支付
	public final static String PAY_WAY_ALIPAY_NS = "05"; // 农商支付宝
	public final static String PAY_WAY_MICROPAY_NS = "06"; // 农商微信
	public final static String PAY_WAY_BANKCARD_NS = "07"; // 农商刷卡支付
	public final static String PAY_WAY_ALIPAY_YS = "08"; // 银盛支付宝
	public final static String PAY_WAY_MICROPAY_YS = "09"; // 银盛微信
	public final static String PAY_WAY_BANKCANCEL_YS = "10"; // 银盛刷卡撤销
	public final static String PAY_WAY_BANKCANCEL_NS = "11"; // 农商刷卡撤销
	public final static String PAY_WAY_SETTING_YS = "12"; // 银盛刷卡管理
	public final static String PAY_WAY_SETTING_NS = "13"; // 农商刷卡管理
	public final static String PAY_WAY_PREAUTH_YS = "14"; // 银盛预授权
	public final static String PAY_WAY_PREAUTH_NS = "15"; // 农商预授权
	public final static String PAY_WAY_YIPAY = "16"; // 翼支付
	public final static String PAY_WAY_SCANCODE = "17"; // 二维凭条
	public final static String PAY_WAY_BAIDU = "18"; // 百度钱包
	public final static String PAY_WAY_QQ = "19"; // QQ钱包
	public final static String PAY_WAY_JD = "20"; // 京东钱包
	public final static String PAY_WAY_YF = "21"; // 预付费卡
	public final static String PAY_WAY_BANKCARD_Q = "22"; // 银联秒到
	public final static String PAY_WAY_ALIPAY_LH = "23"; // 联惠支付宝
	public final static String PAY_WAY_MICROPAY_LH = "24"; // 联惠微信
	public final static String PAY_WAY_HB = "25"; // 和包
	public final static String PAY_WAY_CARD_LH = "26"; // 联惠卡券
	public final static String PAY_WAY_FEIXIPAY = "27"; // 飞洗支付
	public final static String PAY_WAY_BANKUNION = "28"; // 银联扫码
	public final static String PAY_WAY_ALIPAY_WF = "29"; // 威富通支付宝
	public final static String PAY_WAY_MICROPAY_WF = "30"; // 威富通微信

	/**
	 * 参数
	 */
	public final static String PARAM_SUMMARY = "summary"; // 金额：字符串 "1234" 单位为分
	public final static String PARAM_AMOUNT = "amount"; // 金额：货币格式 "￥0.00" 单位为元
	public final static String PARAM_PAYTYPE = "paytype"; // 付款方式
	public final static String PARAM_OPTYPE = "optype"; // 付款方式
	public final static String PARAM_SCANCODE = "scancode"; // 扫描结果
	public final static String PARAM_ISRETURN = "isreturn"; // 是否退款

	public final static Boolean IS_PRINT_AFTERPAY = true;  // 支付成功后是否打印

	/**
	 * 请求类型
	 */
	public final static int GREQUEST_CODE_SCANNIN = 1;  // 扫描
	public final static int GREQUEST_CODE_SCANNIN_NS = 5;  // 农商扫描
	public final static int GREQUEST_CODE_SCANNIN_YS = 6;  // 银盛扫描
	public final static int GREQUEST_CODE_KEYBOARD = 2; // 键盘
	public final static int GREQUEST_CODE_CARDPAY = 3; // 刷卡消费
	public final static int GREQUEST_CODE_PREAUTH = 10; // 预授权
	public final static int GREQUEST_CODE_CASH = 4; // 预授权
	/**
	 * 键盘的操作类型
	 */
	public final static int KEYBOARD_OP_TYPE_PAY = 1; 		// 支付
	public final static int KEYBOARD_OP_TYPE_RETURN = 2; 	// 退货

	/**
	 * 业务处理结果
	 */
	public final static int BUSINESS_SUCCESS = 1;
	public final static int BUSINESS_FAILED = 2;
	public final static int BUSINESS_ERROR = 3;
	public final static int BUSINESS_WAIT = 4;
	public final static int BUSINESS_SERVICE_CONNED = 9;

	/**
	 * 银行支付方式
	 */
	public final static String BANKPAYTYPE_YINGSHEN = "1"; // 银盛
	public final static String BANKPAYTYPE_NONGSHAN = "2"; // 农商

	public static boolean  DEBUG = false;
	public static  int CORES_NUM = 3;

	public static String UPLOAD_URL = "http://www.fujianfeixi.com/uploadImage";
	public static String HTTP_URL = "http://www.fujianfeixi.com/clientService?iscrypt=4";
	public static String HTTP_URL_TEST = "http://www.fujianfeixi.com:9999/clientService?iscrypt=4";
	public static String EQUMENT_INFO = "fx_equipment/view";
	public static String FEXI_PRICE = "lf_feixipay/price";
}
